class CreateSeckillSpus < ActiveRecord::Migration[5.2]
  def change
    create_table :seckill_spus do |t|
      t.integer :spu_id
      t.datetime :start_at
      t.datetime :end_at
      t.decimal :seckill_price, :precision => 10, :scale => 2, :default => 0.0
      t.integer :amount, default: 1
      t.integer :remain, default: 0
      t.integer :state, default: 0

      t.timestamps
    end
  end
end
